<style>
<!--

.resQuery span.error {
    position: absolute !important;
    left: 260px;
}
-->
#menunowrap span.error{
	position: absolute !important;left: 258px;
}
</style>
<div class="pageContent">
    <form method="post" action="${rc.getContextPath()}/manage/menu/saveMenu" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
            <div class="pageFormContent">
                <input type="hidden" name="navTabId" value="${navTabId!''}"> <input type="hidden" name="displayOrdinal" value="<#if (menu.displayOrdinal)??>${menu.displayOrdinal!''}</#if>"> <input type="hidden" name="id" value="<#if (menu.menuCode)??>${menu.menuCode!''}</#if>">
                <fieldset>
                    <dl class="nowrap">
                        <dt><@label key="menuCode.L">菜单编号：</@label></dt>
                        <dd>
                            <input name="menuCode" value="<#if (menu.menuCode)??>${menu.menuCode!''}</#if>" size="32" type="text" maxlength="40" class="required alphanumeric toUp"<#if (menu.menuCode)??> readonly="readonly"<#else> remote="${rc.getContextPath()}/manage/menu/validateMenuCode"</#if> warn="<@label key="menuCodeExist.M">菜单编号已经存在</@label>"/>
                        </dd>
                    </dl>
                    <dl class="nowrap">
                        <dt><@label key="menuText.L">菜单描述：</@label></dt>
                        <dd>
                            <input name="menuText" value="<#if (menu.menuText)??>${menu.menuText!''}</#if>" size="64" type="text" maxlength="60" class="required" />
                        </dd>
                    </dl>
                    <dl class="nowrap" id="menunowrap">
                        <dt><@label key="parentMenuCode.L">上级菜单：</@label></dt>
                        <dd>
                        	<#if pattern=="modify" && menu.parentMenuCode?? && menu.resourceTypeECode="FORM"> 
                        		<input  class="required look" readonly="readonly" name="parentMenuCode" id="menuLookup.menuCode" value="${menu.parentMenuCode!''}" size="32" type="text" maxlength="255" />
                        		<a class="btnLook" width="650" height="450" href="${rc.getContextPath()}/manage/menu/menuLookUp" lookupGroup="menuLookup"><@label key="select.C,menu.C">选择菜单</@label></a>
                            <#else>
                        		<input readonly="readonly" name="parentMenuCode" value="<#if (menu.parentMenuCode)??>${menu.parentMenuCode!''}</#if>" size="32" type="text" maxlength="255" /> 
                            </#if>
                            <input readonly="readonly" style="margin-left: 10px;" name="parentMenuText" id="menuLookup.menuText" value="<#if (menu.parentMenuText)??>${menu.parentMenuText!''}</#if>" size="32" type="text" maxlength="255" />
                        </dd>
                    </dl>
                    <dl class="nowrap">
                        <dt><@label key="tCode.L">事务码：</@label></dt>
                        <dd>
                            <input name="tCode" value="<#if (menu.tCode)??>${menu.tCode!''}</#if>" size="32" maxlength="40" type="text" />
                        </dd>
                    </dl>
                    <dl class="nowrap">
                        <dt><@label key="resource.L">资源：</@label></dt>
                        <dd class="resQuery">
                            <input id="resourceCode" name="resourceCode" value="<#if (menu.resourceCode)??>${menu.resourceCode!''}</#if>" type="hidden" /> <input id="inputCode" name="res.id" value="<#if (menu.resourceCode)??>${menu.resourceCode!''}</#if>" type="hidden" /> <input size="32" readonly="readonly" class="required look" name="res.name" type="text" value="<#if (menu.resourceText)??>${menu.resourceText!''}</#if>" /> <a class="btnLook" width="650" height="450" href="${rc.getContextPath()}/manage/menu/selectResource" lookupGroup="res"><@label key="selectResource.D">选择资源</@label></a>
                        </dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>&nbsp;</dt>
                        <dd>
                            <label style="text-align: left;"><input style="margin-right: 2px;" type="checkbox" name="lockFlag" value="1"<#if (menu.lockFlag)?? && (menu.lockFlag == 1)> checked="true"</#if>><@label key="lock.C">锁定</@label></label>
                        </dd>
                    </dl>
                </fieldset>
            </div>

            <#if (menu.menuCode)??> <#assign createInfo=menu/> <#include "/common/createInfo.html"> </#if>
            <div style="padding-left: 30px;">
            <div class="buttonActive">
                <div class="buttonContent">
                    <button type="submit" onclick="save()"><@label key="save.B">保存</@label></button>
                </div>
            </div>

            <div class="buttonActiveGrey" style="margin-left: 10px;">
                <div class="buttonContent">
                    <button type="button" onclick="cancel()"><@label key="cancel.B">取消</@label></button>
                </div>
            </div>
            </div>
    </form>
</div>

<script type="text/javascript">
     function cancel() {
         var ht="<div class='treeTip'><@label key='treeTips.M'>请点击左侧树形菜单进行相关操作</@label></div>"
         $("#menuDetail",navTab.getCurrentPanel()).html(ht);
     }
     
     function save() {
         $("#resourceCode",navTab.getCurrentPanel()).val($("#inputCode",navTab.getCurrentPanel()).val());
     }
     
         
     </script>
